Skip to content

fix(apple): define in6_ifreq locally so iOS targets build with libc 0.2.190 - #192

Draft
andrewgazelka wants to merge 1 commit into
shellrow:mainfrom
andrewgazelka:fix/ios-in6-ifreq
Draft

andrewgazelka wants to merge 1 commit into
shellrow:mainfrom
andrewgazelka:fix/ios-in6-ifreq

Conversation

@andrewgazelka

@andrewgazelka andrewgazelka commented Oct 10, 2026 •

Copy link
Copy Markdown

libc 0.2.190 only exposes in6_ifreq on macOS (netinet6/in6_var.h is not in the iOS SDK), so cargo check --target aarch64-apple-ios-sim fails with cannot find type in6_ifreq in crate libc (libc 0.2.189 still had it; I only reproduced the ios-sim target).

This defines the struct in src/os/darwin/ipv6_addr_flags.rs, padded to 0x120 bytes (the size encoded in SIOCGIFAFLAG_IN6, asserted at compile time), and adds aarch64-apple-ios and aarch64-apple-ios-sim cargo check jobs to CI.

Measured locally (Xcode 27 beta SDK, stable toolchain, libc pinned to 0.2.190): before, cargo check --target aarch64-apple-ios-sim fails with the error above; after, aarch64-apple-ios-sim, aarch64-apple-ios and aarch64-apple-darwin check clean, cargo test passes (33 tests) and list_interfaces on macOS still reports interface flags. Not run on a device or simulator. The new CI job is untested until it runs here.

AI disclosure: written with Claude (Sonnet); commit carries an Assisted-by: trailer.

….2.190

libc 0.2.190 only exposes in6_ifreq on macOS (netinet6/in6_var.h is not in
the iOS SDK), which broke cargo check for aarch64-apple-ios and
aarch64-apple-ios-sim. Define the struct in the darwin module, sized to the
0x120 bytes encoded in SIOCGIFAFLAG_IN6, and add iOS targets to CI.

Assisted-by: Claude:claude-sonnet-5-5
bisand added a commit to bisand/kvad that referenced this pull request Oct 18, 2026
Phase 0 of docs/relay-plan.md needs a phone column: the phone itself on
mobile data, behind the carrier's NAT alone, not a laptop on its hotspot.

- tools/relay-probe: the core moves into a library (src/lib.rs): tickets,
  the post-quantum endpoint with no port mapping, the dialler's ping loop,
  path names and the summary table. The command keeps its flags and its
  output, --bind included; `listen` stays in main.rs.
- apps/phone: a Network test under More and on the Connect screen, which
  dials with that library on a tokio runtime of its own. Paste the ticket
  from the Mac, Start/Stop, the path as it changes, the command's table and
  log. The phone's probe key is a file in the app's container until the
  Keychain lands; its id is shown and copied for the relay's allow list.
  The screen stays awake during a run.
- libc held at 0.2.189 for iOS: netdev 0.46 (iroh's netwatch) uses
  libc::in6_ifreq, which 0.2.190 made macOS-only (shellrow/netdev#192).

Checked in the iOS simulator against `relay-probe listen --relay
https://relay2.kvad.eu` on this Mac: opened on the relay, LAN after
0.12 s, 0.9 ms median. Builds for aarch64-apple-ios too.
bisand added a commit to bisand/kvad that referenced this pull request Oct 18, 2026
* Run the relay probe from the iPhone: a Network test screen

Phase 0 of docs/relay-plan.md needs a phone column: the phone itself on
mobile data, behind the carrier's NAT alone, not a laptop on its hotspot.

- tools/relay-probe: the core moves into a library (src/lib.rs): tickets,
  the post-quantum endpoint with no port mapping, the dialler's ping loop,
  path names and the summary table. The command keeps its flags and its
  output, --bind included; `listen` stays in main.rs.
- apps/phone: a Network test under More and on the Connect screen, which
  dials with that library on a tokio runtime of its own. Paste the ticket
  from the Mac, Start/Stop, the path as it changes, the command's table and
  log. The phone's probe key is a file in the app's container until the
  Keychain lands; its id is shown and copied for the relay's allow list.
  The screen stays awake during a run.
- libc held at 0.2.189 for iOS: netdev 0.46 (iroh's netwatch) uses
  libc::in6_ifreq, which 0.2.190 made macOS-only (shellrow/netdev#192).

Checked in the iOS simulator against `relay-probe listen --relay
https://relay2.kvad.eu` on this Mac: opened on the relay, LAN after
0.12 s, 0.9 ms median. Builds for aarch64-apple-ios too.

* Link the iPhone app for iOS 17 when cargo builds it alone

A bare cargo build for aarch64-apple-ios linked for iOS 10, older than
Skia's prebuilt objects (iOS 12), and failed on ___chkstk_darwin; Xcode
builds were unaffected, since it passes project.yml's deployment target.
apps/phone/.cargo/config.toml sets the same 17.0 for cargo, without
overriding Xcode's.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant